<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js"></script>
</head>

<body>
  <div id="app">
    <ul>
    </ul>
  </div>

  <script>
    var cities = ['太原', '北京', '上海']

    var arr = [];
    $(cities).each((index, item) => {
      arr.push(`<li>${item}</li>`)
    })

    $("#app ul").append(arr.join(''))

  </script>


</body>

</html>